-
Notifications
You must be signed in to change notification settings - Fork 4
Add Nix-based build environment, update CI pipeline to use it, add contribution guide #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Workflow Status ReportGenerated for commit 6ecba47 on Tue Sep 16 23:16:32 UTC 2025. In case of failure, clippy warnings and rustfmt changes (if any) will be indicated as CI check warnings in the file comparison view. Documentation: Read Online Download Coverage Report: Read Online Download Note: Online versions of documentation and coverage reports may not be available indefinitely, especially after the pull request was merged. Code Coverage ReportCoverage target is 80%. Expand to view coverage statistics
Total coverage: 53.21% |
current nightly is broken when used with the nix rust-overlay, but need nightly compiler for testing
Description
In an attempt to make working on
libcoap-rs
easier, this PR adds a Nix-based reproducible development environment using devenv.sh. This environment can be loaded directly (if you have the nix package manager installed) or by loading the newly defined dev container in a supported IDE (I tested with CLion and VS Code). The CI pipeline has also been rewritten accordingly so that we use the same environment for development and CI testing.Additionally, I have written a contribution guide with the most important aspects of the libcoap-rs development workflow. This includes the environment setup, commit and PR guidelines, etc.
It also contains a proposed policy regarding LLM-generated code in libcoap-rs — feedback is very much welcome if you have some.
TODO: Before merging, I will also move some of the build instructions currently found in the
libcoap-sys
rustdoc into a dedicatedBUILDING.md
file and also improve these instructions in the process.How to test
Follow the newly written contribution guide that can be found here to test the development environment. For JetBrains and VS Code, I have also added some run configurations for the Rust unit and integration tests.
As of now, I have only tested this on Linux; If one of the reviewers has the necessary hardware/software setup to do so, it would be great if you could test on Windows (with the devcontainer-based setup or WSL) and/or macOS (with a native Nix install or WSL) and report back any issues you have found.